﻿using System;
using System.Collections.Generic;
using MTC.Common.DTO;
using MTC.DataAccess;

namespace MTC.Business.PayIn
{
    public class PayIn
    {
        public static List<Common.DTO.PayInSchedule> GetAPayInSchedule(DateTime schedule, int shiftId)
        {
            return PayInsDataAccess.GetPayInSchedule(schedule, shiftId);
        }

        public static bool UpdateAPayIn(PayInSchedule schedule)
        {
            if (schedule.PayInId == 0)
            {
                PayInsDataAccess.AddAPayIn(schedule);
            }
            else
            {
                return PayInsDataAccess.UpdateAPayIn(schedule);
            }
            return true;
        }
    }
}
